Skip to content

Himanshuagnihotri #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Ai1996Himanshu
Copy link

No description provided.

import java.util.*;
import java.util.regex.*;
class Himanshu
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please put curly braces after the statement, for good practice.
For Ex : like this
class Himanshu {
}
not like this, it will take one extra line
class Himanshu
{

}

String text=sc.nextLine();
String a[]=new String[100];
n=Integer.parseInt(sc.nextLine());
for(i=0;i<n;i++)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use proper naming convention or meaningful variable names while declaring variables. And create a separate method to get the output.

a[i]=sc.nextLine();
}
for(i=0;i<n;i++)
{ for(int j=-1;(j=text.indexOf(a[i],j+1)) !=-1;)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improper indentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants